<%-- 
    Document   : ViewExpiry
    Created on : Oct 15, 2011, 4:01:12 PM
    Author     : Mikeno
--%>

<%@page import="java.util.*,hyper.market.beans.*,java.io.*"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<jsp:useBean id="stock" class="hyper.market.beans.StockBean" scope="session"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
            <link rel="stylesheet" href="style/desk.css" type="text/css" />
        <link rel="stylesheet" href="style/960.css" type="text/css" />
        <link rel="stylesheet" href="style/960_12_col.css" type="text/css" />
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Expiry</title>
    </head>
    <body>
         <div class="suffix_12"></div>
        <br>
        <div class="container_12">
                <div class="grid_3">
                    <div class="editinfoform">

                        <!-- Item Name-->
                        <br>
                        <label id="itemname_label"  class="inputlabel medlabel"> Item's Name : <%= stock.getStockname()%></label>
                        <br>
                        <!--Status-->
                        <label id="status_label" class="inputlabel medlabel">  Status :
                            <% String stat = stock.getStatus();
                                        if (stat.equals("Available")) {
                                            out.println("<font color='#FF4759'> Available </font>");
                                        } else if (stat.equals("Out Of Stock")) {
                                            out.println("<font color='#8C8066'> Out Of Stock </font>");
                                        } else if (stat.equals("Ordering")) {
                                            out.println("<font color='#8C8066'> Ordering </font>");
                                        } else {
                                            out.println("<font color='#FFCC26'> Low in Stock </font>");
                                        }
                            %>  </label>
                        <br>
                        <!--Threshold-->

                        <label id="threshold_label" class="inputlabel medlabel">Set Threshold Level : <%= stock.getThreshold()%></label>

                        <br>
                        <!--Quantity-->
                        <label id="quantity_label" class="inputlabel medlabel"> Quantity : <%=stock.getQuantity()%></label>

                        <br>
                        <!--Cost Price-->

                        <label id="costprice_label" class="inputlabel medlabel">Cost Price : $ <%= stock.getCostprice()%></label>

                        <br>
                        <!--Expiry Date-->

                        <label id="expiry_label" class="inputlabel medlabel">Expiry Date : <%=stock.getExpiryDate()%></label>

                        <br>

                    </div>
                </div>
                <div class="grid_4 suffix_5" id="imagediv">

                    <% String image = stock.getStockImage();
                                out.println("<img id=\"stockimage\" src=\"./product/" + image + "\" height=\"125\" width=\"200\">");
                    %>

                    <!--Selling Price-->
                    <div id="sellingprice_div">
                        <label id="sellingprice_label" class="inputlabel medlabel">Selling Price : $ <%= stock.getSellingprice()%></label>
                    </div>

                    <!--Discount-->
                    <div id="discount_div">
                        <label id="discount_label" class="inputlabel medlabel">Discount : <%=stock.getDiscount()%>%  </label>
                    </div>
                </div>
        </div>
    </body>
</html>
